Section 1 describes how aimilarity searches can be conducted on the data. Datasets are imported using FileImport module associated with Polymetrics
Other imported libraries are
scikit-learn - for predictive data analysis
plotly - graphing library
import pandas as pd
import numpy as np
import json
import Polymetrics as poly
import FileImport
import traceback
#from sklearn.metrics.pairwise import distance_metrics
#from sklearn.neighbors import NearestNeighbors
import plotly.express as px
import plotly.io as pio
import plotly.graph_objects as go
import seaborn as sns
import matplotlib.pyplot as plt
import polymetrics_config
import plotly.express as px
import plotly.graph_objects as go
from IPython.display import display
The data used in the example is taken from patent US 2013/0046061 (Hermel-Davidock et al.). The patent data has a good mix of examples to demonstrate the handling of different polymer object types. The data is compiled into an excel file - 'Example_Dataset.xlsx'.
What is a polymer object?
Polymer object is any polymer product. It can be a
Polymetrics Dataset is a table organized in such a way that rows are individual polymer objects and columns are their attributes.
The XLSXImport function prepares the imported polymer objects for further processing.
df_in = FileImport.XLSXImport("Article/Example_Dataset.xlsx", sheet_name = 'Data')
The additional features developed from the experimental data can be combined with the other explantory variables to make a features array
result = df_in[(df_in['Project'] == 'kNN')]
FYI = result.dropna(axis = 1)
display(FYI.tail(5))
| Identifier | Name | UID | Project | Type | Density | Tm | I2 | |
|---|---|---|---|---|---|---|---|---|
| 75 | DOWLEX_GM_8091 | DOWLEX™ GM 8091 | 687A | kNN | Resin_Commercial | 0.918 | 111.0 | 1.0 |
| 76 | DOWLEX_NG_5045P | DOWLEX™ NG 5045P | 6DYZ | kNN | Resin_Commercial | 0.917 | 118.0 | 0.8 |
| 77 | ELITE_AT_6111 | ELITE™ AT 6111 | 6EXO | kNN | Resin_Commercial | 0.912 | 109.0 | 3.7 |
| 78 | Marlex_5428 | Marlex® 5428 | 6K0I | kNN | Resin_Commercial | 0.930 | 111.0 | 2.2 |
| 79 | Marlex_5430 | Marlex® 5430 | 6LYJ | kNN | Resin_Commercial | 0.925 | 111.0 | 2.2 |
poly.similarity_matrix(FYI, label = 'UID', Q = 0.3, plot = True)